package com.springapp.jsonmodel;

import com.springapp.model.Cathegory;

/*
 * 
 * @uthor Sim4ik
 * 
 */

public class CategoryJson {
	
	private Integer id;
	
	private String name;

	public CategoryJson(){}
	
	public static CategoryJson toModel(Cathegory cathegory){
		CategoryJson cj = new CategoryJson();
		cj.setId(cathegory.getId());
		cj.setName(cathegory.getName());
		return cj;
	}
	

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
